package com.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by lmn on 2018/4/8.
 */
@Controller
@RequestMapping("template")
public class TemplateController {

    @RequestMapping("/freemarker/demo")
    public String freemarkerDemo(ModelMap modelMap){
        modelMap.addAttribute("name","diandian2u");
        return "freemarker/demo";
    }

    @RequestMapping("/thymeleaf/demo")
    public String thymeleafDemo(ModelMap modelMap){
        modelMap.addAttribute("name","diandian2u");
        return "thymeleaf/demo";
    }
}
